﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
//using BTGISWASECO.BusinessEntities;

/// <summary>
/// Summary description for TramBomEntities
/// </summary>
namespace BTGISWASECO.BusinessEntities
{
    public class TramBomEntities
    {
        #region khai bao thuoc tinh
        private int _objectID;
        private string _IDTramBom;
        private string _IDDMA;
        private string _IDDMZ;
        private int _LoaiTramBom;        
        private string _LoaiTramBomText;
        private string _TenTram;
        private string _MoTaViTri;
        private int _NamXayDung;
        private double _DTKhuDat;
        private double _DTPhongBom;
        private double _DTPVanHanh;
        private string _TGHoatDong;
        private string _CheDoVanHanh;
        private double _CongSuat;
        private int _SoLuongBom;
        private double _DoCaoSanBom;
        private string _TTSuDungDat;
        private int _DonViQL;
        private string _DonViQLText;
        private string _SoNha;
        private string _MaDuong;
        private string _MaPhuong;
        private string _MaQuan;
        private int _TinhTrang;
        private string _TinhTrangText;
        private int _ThuocSoHuu;
        private string _ThuocSoHuuText;
        private int _SoLanSuCo;
        private string _NguoiCNCuoi;
        private DateTime _NgayCNCuoi;
        private string _GhiChu;

        public int LoaiTramBom
        {
            get { return _LoaiTramBom; }
            set { _LoaiTramBom = value; }
        }

        public double DoCaoSanBom
        {
            get { return _DoCaoSanBom; }
            set { _DoCaoSanBom = value; }
        }
        
        public double DTPVanHanh
        {
            get { return _DTPVanHanh; }
            set { _DTPVanHanh = value; }
        }

        public double DTPhongBom
        {
            get { return _DTPhongBom; }
            set { _DTPhongBom = value; }
        }

        public int NamXayDung
        {
            get { return _NamXayDung; }
            set { _NamXayDung = value; }
        }

        public int ThuocSoHuu
        {
            get { return _ThuocSoHuu; }
            set { _ThuocSoHuu = value; }
        }

        public string ThuocSoHuuText
        {
            get { return _ThuocSoHuuText; }
            set { _ThuocSoHuuText = value; }
        }

        public string LoaiTramBomText
        {
            get { return _LoaiTramBomText; }
            set { _LoaiTramBomText = value; }
        }

        public string MaQuan
        {
            get { return _MaQuan; }
            set { _MaQuan = value; }
        }

        public string MaPhuong
        {
            get { return _MaPhuong; }
            set { _MaPhuong = value; }
        }

        public string MaDuong
        {
            get { return _MaDuong; }
            set { _MaDuong = value; }
        }

        public string CheDoVanHanh
        {
            get { return _CheDoVanHanh; }
            set { _CheDoVanHanh = value; }
        }

        public string MoTaViTri
        {
            get { return _MoTaViTri; }
            set { _MoTaViTri = value; }
        }

        public int SoLanSuCo
        {
            get { return _SoLanSuCo; }
            set { _SoLanSuCo = value; }
        }

        public string SoNha
        {
            get { return _SoNha; }
            set { _SoNha = value; }
        }

        public string DonViQLText
        {
            get { return _DonViQLText; }
            set { _DonViQLText = value; }
        }

        public string TinhTrangText
        {
            get { return _TinhTrangText; }
            set { _TinhTrangText = value; }
        }

        public string TTSuDungDat
        {
            get { return _TTSuDungDat; }
            set { _TTSuDungDat = value; }
        }

        public string TGHoatDong
        {
            get { return _TGHoatDong; }
            set { _TGHoatDong = value; }
        }

        public string GhiChu
        {
            get { return _GhiChu; }
            set { _GhiChu = value; }
        }

        public string TenTram
        {
            get { return _TenTram; }
            set { _TenTram = value; }
        }

        public string NguoiCNCuoi
        {
            get { return _NguoiCNCuoi; }
            set { _NguoiCNCuoi = value; }
        }

        public DateTime NgayCNCuoi
        {
            get { return _NgayCNCuoi; }
            set { _NgayCNCuoi = value; }
        }

        public int DonViQL
        {
            get { return _DonViQL; }
            set { _DonViQL = value; }
        }

        public int TinhTrang
        {
            get { return _TinhTrang; }
            set { _TinhTrang = value; }
        }

        public double CongSuat
        {
            get { return _CongSuat; }
            set { _CongSuat = value; }
        }

        public int SoLuongBom
        {
            get { return _SoLuongBom; }
            set { _SoLuongBom = value; }
        }
        
        public int OBJECTID
        {
            get { return _objectID; }
            set { _objectID = value; }
        }

        public string IDTramBom
        {
            get { return _IDTramBom; }
            set { _IDTramBom = value; }
        }

        public string IDDMZ
        {
            get { return _IDDMZ; }
            set { _IDDMZ = value; }
        }

        public string IDDMA
        {
            get { return _IDDMA; }
            set { _IDDMA = value; }
        }

        public double DTKhuDat
        {
            get { return _DTKhuDat; }
            set { _DTKhuDat = value; }
        }

        # endregion khai bao

        #region phuong thuc

        public TramBomEntities()
        {

        }

        public TramBomEntities(string IDTramBom, string IDDMA, string IDDMZ, int LoaiTramBom,
                            string TenTram, string MoTaViTri, int NamXayDung, double DTKhuDat,
                            double DTPhongBom, double DTPVanHanh, string TGHoatDong, string CheDoVanHanh,
                            double CongSuat, int SoLuongBom, double DoCaoSanBom, string TTSuDungDat,
                            int DonViQL, string SoNha, string MaDuong, string MaPhuong,
                            string MaQuan, int TinhTrang, int ThuocSoHuu, int SoLanSuCo,
                            string NguoiCNCuoi, DateTime NgayCNCuoi, string GhiChu)
        {
            //Begin Ninh Thuan
            this._IDTramBom = IDTramBom;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._LoaiTramBom = LoaiTramBom;
            this._TenTram = TenTram;
            this._MoTaViTri = MoTaViTri;
            this._NamXayDung = NamXayDung;
            this._DTKhuDat = DTKhuDat;
            this._DTPhongBom = DTPhongBom;
            this._DTPVanHanh = DTPVanHanh;
            this._TGHoatDong = TGHoatDong;
            this._CheDoVanHanh = CheDoVanHanh;           
            this._CongSuat = CongSuat;
            this._SoLuongBom = SoLuongBom;
            this._DoCaoSanBom = DoCaoSanBom;
            this._TTSuDungDat = TTSuDungDat;
            this._DonViQL = DonViQL;                    
            this._SoNha = SoNha;
            this._MaDuong = MaDuong;
            this._MaPhuong = MaPhuong;
            this._MaQuan = MaQuan;
            this._TinhTrang = TinhTrang;
            this._ThuocSoHuu = ThuocSoHuu;
            this._SoLanSuCo = SoLanSuCo;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._GhiChu = GhiChu;
        }
        public TramBomEntities(int OBJECTID,string IDTramBom, string IDDMA, string IDDMZ, int LoaiTramBom,
                            string TenTram, string MoTaViTri, int NamXayDung, double DTKhuDat,
                            double DTPhongBom, double DTPVanHanh, string TGHoatDong, string CheDoVanHanh,
                            double CongSuat, int SoLuongBom, double DoCaoSanBom, string TTSuDungDat,
                            int DonViQL, string SoNha, string MaDuong, string MaPhuong,
                            string MaQuan, int TinhTrang, int ThuocSoHuu, int SoLanSuCo,
                            string NguoiCNCuoi, DateTime NgayCNCuoi, string GhiChu)
        {
            this._objectID = OBJECTID;
            this._IDTramBom = IDTramBom;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._LoaiTramBom = LoaiTramBom;
            this._TenTram = TenTram;
            this._MoTaViTri = MoTaViTri;
            this._NamXayDung = NamXayDung;
            this._DTKhuDat = DTKhuDat;
            this._DTPhongBom = DTPhongBom;
            this._DTPVanHanh = DTPVanHanh;
            this._TGHoatDong = TGHoatDong;
            this._CheDoVanHanh = CheDoVanHanh;
            this._CongSuat = CongSuat;
            this._SoLuongBom = SoLuongBom;
            this._DoCaoSanBom = DoCaoSanBom;
            this._TTSuDungDat = TTSuDungDat;
            this._DonViQL = DonViQL;
            this._SoNha = SoNha;
            this._MaDuong = MaDuong;
            this._MaPhuong = MaPhuong;
            this._MaQuan = MaQuan;
            this._TinhTrang = TinhTrang;
            this._ThuocSoHuu = ThuocSoHuu;
            this._SoLanSuCo = SoLanSuCo;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._GhiChu = GhiChu;
        }

        public TramBomEntities(DataRow row)
        {
            this._objectID = Convert.ToInt32(row["OBJECTID"]);
            this._IDTramBom = row["IDTramBom"].ToString();
            this._IDDMA = row["IDDMA"].ToString();
            this._IDDMZ = row["IDDMZ"].ToString();
            this._LoaiTramBomText = row["LoaiTram"].ToString();
            this._TenTram = row["TenTram"].ToString();
            this._MoTaViTri = row["MoTaViTri"].ToString();
            if (row["NamXayDung"].ToString() != "Null")
                this._NamXayDung = Convert.ToInt32(row["NamXayDung"]);
            if (row["DTKhuDat"].ToString() != "Null")
                this._DTKhuDat = Convert.ToDouble(row["DTKhuDat"]);
            if (row["DTPhongBom"].ToString() != "Null")
                this._DTPhongBom = Convert.ToDouble(row["DTPhongBom"]);
            if (row["DTPVanHanh"].ToString() != "Null")
                this._DTPVanHanh = Convert.ToDouble(row["DTPVanHanh"]);
            this._TGHoatDong = row["TGHoatDong"].ToString();
            this._CheDoVanHanh = row["CheDoVanHanh"].ToString();
            if (row["CongSuat"].ToString() != "Null")
                this._CongSuat = Convert.ToDouble(row["CongSuat"]);
            if (row["SoLuongBom"].ToString() != "Null")
                this._SoLuongBom = Convert.ToInt32(row["SoLuongBom"]);
            if (row["DoCaoSanBom"].ToString() != "Null")
                this._DoCaoSanBom = Convert.ToDouble(row["DoCaoSanBom"]);
            if (row["TTSuDungDat"] != null)
                this._TTSuDungDat = row["TTSuDungDat"].ToString();
            if (row["DonViQL"].ToString() != "Null")
                this._DonViQLText = row["DonViQL"].ToString();
            this._SoNha = row["SoNha"].ToString();
            this._MaDuong = row["MaDuong"].ToString();
            this._MaPhuong = row["MaPhuong"].ToString();
            this._MaQuan = row["MaQuan"].ToString();
            this._TinhTrangText = row["TinhTrang"].ToString();
            this._ThuocSoHuuText = row["ThuocSoHuu"].ToString();
            if (row["SoLanSuCo"].ToString() != "Null")
                this._SoLanSuCo = Convert.ToInt32(row["SoLanSuCo"]);
            this._NguoiCNCuoi = row["NguoiCNCuoi"].ToString();
            if (row["NgayCNCuoi"].ToString() != "Null")
                this._NgayCNCuoi = Convert.ToDateTime(row["NgayCNCuoi"]);
            this._GhiChu = row["GhiChu"].ToString();	
        }


        //public TramBomEntities TramBomIDataReader(IDataReader dr)
        //{
        //    BTGISWASECO.BusinessEntities.TramBomEntities obj = new BTGISWASECO.BusinessEntities.TramBomEntities();
        //    obj._objectID = (dr["ObjectID"] is DBNull) ? -1 : Convert.ToInt32(dr["ObjectID"]);
        //    obj._IDTramBom = (dr["IDTramBom"] is DBNull) ? string.Empty : dr["_IDTramBom"].ToString();
        //    obj._IDDMA = (dr["IDDMA"] is DBNull) ? string.Empty : dr["_IDDMA"].ToString();
        //    obj._ChieuDongTramBom = (Convert.ToInt32(dr["ChieuDongTramBom"]) >= 0) ? 0 : Convert.ToInt32(dr["ChieuDongTramBom"]);
        //    obj._SVDongTramBom = (dr["SVDongTramBom"] is DBNull) ? 0 : Convert.ToInt32(dr["SVDongTramBom"]);
        //    return obj;
        //}

        #endregion phuong thuc
    }
}